<?php
declare (strict_types = 1);

namespace app\api\exception;

use think\Exception;

/**
 * 存放默认反馈信息，通过动态修改其中的默认信息，达到动态反馈的效果
 */
class BaseException extends Exception
{
    public $code = 400;
    public $message = '参数错误';

    public function __construct($message = '',$code = 0)
    {
        if( !empty($message) ){
            $this->msg = $message;
        }
        if( $code ){
            $this->code = $code;
        }
        //parent::__construct($message,$code);
    }
}